package com.example.seckill.response;

import lombok.Data;

@Data
public class CommonReturnType {
    private String status;//success fail
    private Object data;//fail 通用错误码格式

    public static CommonReturnType create(String status, Object data) {
        CommonReturnType commonReturnType = new CommonReturnType();
        commonReturnType.setData(data);
        commonReturnType.setStatus(status);
        return commonReturnType;
    }
    public static CommonReturnType create(Object data) {
        return create("success",data);
    }

}
